package com.diankangwo.factory.dao;

import com.diankangwo.factory.entity.TdClassification;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 二级分类
 */
@Mapper
@Repository
public interface TdClassificationMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(TdClassification record);

    int insertSelective(TdClassification record);

    TdClassification selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TdClassification record);

    int updateByPrimaryKey(TdClassification record);

    /**
     * 查询所有二级菜单
     * @return
     */
    List<TdClassification> queryAll();

    /**
     * 按一级分类ID 查询
     * @param typesId
     * @return
     */
    List<TdClassification> queryByTypeId(int typesId);


    /**
     * 批量删除
     */
    void deleteBatch(int typeId);
}